package exoEcho;

import javax.naming.*;
import java.io.*;
import java.util.*;

public class echoClient {

    private static exoEcho.session.echoItf c ;

    public static void main(String[] args) throws Exception {

	try {
	  
	  InitialContext ctx = new InitialContext();		
	  c = (exoEcho.session.echoItf) ctx.lookup("leRepeteur");
	}
	catch (Exception ex) {
		System.err.println("erreur dans le lookup");
		ex.printStackTrace();
	}
	
		System.out.println("Tappe un truc");
		Scanner s = new Scanner(System.in);
		String str = s.next();
		System.out.println(c.echo(str));
    }
}
